Added non-null condition in both login and signup