functional test for the login
total rewrite