created log in funcitonality and flash alerts