This answer mainly deals with password hashing, not your other subqueries. For them, my main advice is not to reinvent the wheel: use existing frameworks that work well with GAE. It offers native Django deployments, but also has a built-in WebOb installation, so you should also consider the various WebOb platforms (Pyramid, Turbogears, etc.). All of them will have ready-made libraries to handle a lot of this for you (for example: many of the WebOb frameworks use Beaker to process cookie-based sessions)
Regarding password hashing ... since you indicated in some other comments that you are using the Google App Engine, you want to use the SHA512-Crypt password hash.
Other key choices for storing password hashes as secure as possible are BCrypt, PBKDF2, and SCrypt. However, GAE does not offer C-acceleration support for these algorithms, so the only way to deploy them is through a pure-python implementation. Unfortunately, their algorithms do too much bit fiddling for a pure-python implementation to make it fast enough to be both safe and responsive. While the GAE implementation of the Python crypt module offers SHA512-Crypt support with C-acceleration (at least every time I tested it), so it can be run with sufficient power.
As for writing the actual code, you can directly use the crypt module. You will need to take care of creating your own salt strings when transferring them to the crypt, and when encrypting new passwords, call crypt.crypt(passwd, "$6$" + salt) . $6$ reports that it uses SHA512-Crypt.
Alternatively, you can use the Passlib library to handle most of this for you (disclaimer: I am the author of this library). To quickly deploy GAE:
from passlib.context import CryptContext pwd_context = CryptContext(schemes=["sha512_crypt"], default="sha512_crypt", sha512_crypt__default_rounds=45000)
Note: if you care about password security, no matter what you do, do not use one HASH algorithm (salt + password) (for example, Django, PHPass, etc.), since they can be trivially rude -forced.