added last_login functionality