SL: add login and authentation function