added login functions and test page