setting up sessions and user profile