Changed some logic in the application controller
Added an actual authentication/session system