Updated to redirect for bad login
More error conditions, allowing for overwrite with checkbox