added default redirect to main page
added default redirect to main page
fixed some bugs after api change