Added login and sessions

use self.request.session to get the session.
session['userType'] is the user's logged in state