finished log in method that makes sure the user name is unique - Anders (supervisor Christoffer)