Authorization

add authorization function