Fixed syntax + API deprecation +

error with login and unwrapped Optional error