added optional user authentication (log in) functions to the sessions an...

...d application controller