refactored functional tests and added login/registration tests