finished login and permissions