Finished login tests and implementation