added sign in/out function