moving and loggedin function