Added app authentication, user authentication, and session key generation.