Adding user authentication and logout methods