Fixed issues with login and register. More issues in work.
Fixed issue where popup would occur after registering.
Merge remote-tracking branch 'origin/master'