Added login user checking logic