Add javadocs, produce errors on empty login

ub-12

Added javadocs for the login and logout methods, added error messages when a blank or half-empty login form is submitted, added flash messages when logging in and logging out.