added user login functionality with sessions and passwords