User login, setting the session and logout is done.
Also the other section can now be restricted
to authenticated user using the global helper
function.