Fixed some javascript calls and dialogs
Added Authentication Model