try catch on login