sign in and switch layout function
merge fix