Fixed and checked login functions, added test page