Fixed rep and selectedProfile not being defined for offline or demo accounts

For demo accounts the authentication returns a valid response except for selectedProfiles is empty.
For non authenticated accounts rep was not defined so it would crash out.