validate on login and signup