Working on Login and main functionality