Refactored tests and added test for signing in using button