Login and Session management : NOT TESTED. TO DO by Paul