Renamed /api/loggedin to /api/user because that is more semantic