Fix #1246 Add post-login tasks to be executed after login