You have a problem here:
Accounts.onLogin is undefined on the client because it is a server-only API.
UPDATE 06/15/2015:, this is no longer the case. Accounts.onLogin now also available on the client.
Router.go is undefined on the server, because redirection with iron: router is a client API.
If you use {{> loginButtons}} , you can try this workaround for the client:
Tracker.autorun(function(){ if(Meteor.user()){
If you use a custom login form with Meteor.loginWithSomething , you can do the redirection in the login method callback.
source share