added login functionality
added flash alerts