Updated if else and added login and profile pages