login and main page switch done