added loggedin = true