add sign in, tests, and flash messages