Log in functionality

Added loggedIn
Added checkLogged( )