You shouldn't need to store the password in the session really (unless of course you want to be able to forcefully log a user out). The session is valid because you have checked the users log in details before assigning the particular 'name' session variable. As long as 'name' is set, the user has logged in. And it's only valid for as long as the user has their browser open.
There is a security concern known as session hijacking (Google it). However, you are far more at risk for performing database queries on unsanitised form input. See the link in my signature.