added login redirect when not an admin + fixed response codes