Enhance username and password not empty check in login function.