added more logic to flat button and launch sign in view controller at launch