Security update

A code audit was conducted and several security issues were found.
This commit will fix the the security issues found in the login and
register classes.