change user login checking logic