Throwing exception if login info is not available