Added functional tests for login