login and registration fixes