Fixed User find_by_name

Was previously returning the first User every time.
Added logging in n' logging out