add function for check user login