Fixed login problem with redirecting to register
Deleted error handling templates
Security for registration to avoid sql errors