fixing user code
user login and sessions working