Added login/logout functionality and everything that's needed. Chapter 8