Fix login form bug

* redirect failed login to root_path
* enable flash alerts