Session management working

User can register and login. User is routed to login page if session
has expired, and if user attempts to access login or registration page
while logged in the will be routed to their home page