Seperated the user log in and log out functionality from the main app.js file.
Changed Titanium.X to Ti.X to keep a specific house style.
Changed if else statements to keep a specific house style.