Refactored app code
Started work on authentication support