Fixed user login to use session cookies