User improvements

Login and User validation improvements.
Merge remote-tracking branch 'origin/Tobias'