modify isloggedin function delete some unuse lines