fixing crash in log in